const mongoose = require('mongoose')
const schema = new mongoose.Schema({
  _id: {
    type: String
  },
      username: {
        type: String
      },
      score: {
        type: String
      },
      totalTitle: {
        type: String
      },
      title: {
      type: String
      },
      bywho: {
        type:String
      },
  single: [{
   
    title: {
      type: String
    },
    score: {
      type: String
    },
    pick: {
      type: String
    },
    total: {
      type: String
    },
    singleOption:[{
      pick: {
        type: String
      },
      answer: {
        type: String
      },
    }]
  }],
  multiple: [{
    title: {
      type: String
    },
    score: {
      type: String
    },
    pick: [{
      type: String
    }],
    total: {
      type: String
    },
    multipleOption:[{
      pick: {
        type: String
      },
      answer: {
        type: String
      },
    }]
  }],
  fill: [{
    title: {
      type: String
    },
    score: {
      type: String
    },

    total: {
      type: String
    },
      answer: {
        type: String
      },
      pick: {
        type: String
      },
  }],
  
  discuss: [{
    title: {
      type: String
    },
    total: {
      type: String
    },
    score: {
      type: String
    },
    pick: {
      type: String
    },
     answer: {
      type: String
      },
      question: {
        type:String
      },
  }],
  judge: [{
    title: {
      type: String
    },
    total: {
      type: String
    },
    score: {
      type: String
    },
    pick: {
      type: String
    },
     answer: {
      type: String
      },
      pick: {
        type: String
      },
      question: {
        type:String
      },
  }],
  singleScore: {
    type: String
  },
  multipleScore: {
    type:String
  },
  judgeScore: {
    type:String
  },
  discussScore: {
    type:String
  },
 fillScore: {
    type:String
  },
  totalscore: {
    type: String
  }
},{
  timestamps: true
});


module.exports = mongoose.model('Answer', schema)